package com.itheima.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <h1>发表评论dto</h1>
 *
 * @author <a href="515857087@qq.com">叶世铭</a>
 * @since 2022/10/21
 */
@Data
@ApiModel(value = "发表评论Dto")
public class CommentDto implements Serializable {
    private static final long serialVersionUID = -2420811503077223237L;

    /**
     * 信息id
     */
    @NotNull(message = "信息id不能为空")
    @ApiModelProperty(value = "信息id", required = true)
    private Integer messageId;

    /**
     * 评论内容
     */
    @NotEmpty(message = "评论内容不能为空")
    @ApiModelProperty(value = "评论内容", required = true)
    private String content;

    /**
     * 父评论id
     */
    @ApiModelProperty(value = "父评论id", notes = "没有父级评论时输入0或者不输入")
    private Integer parentCommentId = 0;

}
